#include <stdio.h>

int main() {
    char op;
    int return_code;
    float result, num;

    printf("Enter an expression: ");

    scanf("%f", &result);
    do {
        op = getchar();
        switch (op) {
            case '*':
                scanf("%f", &num);
                result *= num;
                break;
            case '+':
                scanf("%f", &num);
                result += num;
                break;
            case '-':
                scanf("%f", &num);
                result -= num;
                break;
            case '/':
               scanf("%f", &num);
               result /= num;
               break;
            default:
               break;
        }
    } while (op != '\n');

    printf("Value of expression: %f\n", result);

    return 0;
}
